

var p = new Map();

p[2] = 1;
//hashmap
var o = {
    '2' :1,
}

o['2'];


function(arr){
    if(arr.length !== 5)
        throw 'err';

    var x = new Map(); //花色
    var m = new Map(); //数值
    //p = {x:'ht', v:1}
    for(let p in arr){
        if(m.has(p.v))
            m[p.v]++;
        else
            m[p.v] = 1;  
            
        if(x.has(p.x))
            x[p.x]++;
        else
            x[p.x] = 1;  
    } 



    

    var ks = m.keys.Sort();
    var vs = m.values.Sort();

    if(ks.length == 5){        
        return vs.length == 1 ? '同花顺子' : "顺子";
    }

    if(vs.length == 2){
        return "four";
    }

    if(vs.length == 3){
        //...
    } 


}